#include <bits/stdc++.h>

using namespace std;



struct TreeNode {
    int val;
    TreeNode *left;
    TreeNode *right;
    TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};

class Solution {
public:
    TreeNode* mirrorTree(TreeNode* root) {
        if(root==nullptr) return nullptr;
        TreeNode *l=root->left,*r=root->right;
        root->left=r;
        root->right=l;
        mirrorTree(l);
        mirrorTree(r);
        return root;
    }
};

int main(){




    return 0;
}